<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::pattern('id','\d+');

//-----------------------------------

Route::get('/', function () {
    return view('welcome');
});

//-----------------------------------

Route::post('article/add','ArticleController@add');
Route::post('article/{id}/del','ArticleController@del');
Route::post('article/{id}/update','ArticleController@update');
Route::get('article/list/{cateid?}','ArticleController@getListByCate');
Route::get('article/{id}','ArticleController@show');
Route::post('article/{id}/comment/close','ArticleController@closeComment');
Route::post('article/{id}/comment/open','ArticleController@openComment');


